<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>钢镚点评</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
    <meta HTTP-EQUIV="Cache-Control" CONTENT="max-age=0 ,no-cache, must-revalidate">
    <meta HTTP-EQUIV="expires" CONTENT="0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Access-Control-Allow-Origin" content="*"/>
    <style type="text/css">
        .commentW {
            width: 2rem;
        }

        .commentH {
            height: 2rem;
        }

        .commentHeadImage {
            margin-left: 0.8125rem;
            float: left;
        }

        .commentNickName {
            float: left;
            width: calc(100% - 5.5375rem);
            margin-left: 0.5rem;
        }

        .commentDz {
            width: 1.75rem;
            float: right;
        }

        .commentDiv {
            width: 100%;
            padding-top: 0.9375rem;
        }

        .commentDivC1 {
            width: 100%;
            height: 2rem;
        }

        .commentDivC2 {
            margin-left: 3.3125rem;
            margin-top: 0.625rem;
            padding-right: 1.55rem;
            font-size: 0.6875rem;
            color: #808080;
            letter-spacing: 0.05rem;
            padding-bottom: 0.625rem;
            border-bottom: 1px #e6e6e6 solid;
        }
    </style>
    <script type="text/javascript" src="js/jquery-1.12.2.js"></script>
    <script type="text/javascript" src="js/date.js"></script>
    <script type="text/javascript" src="js/wechat.js"></script>
    <script type="text/javascript" src="js/localStorage.js"></script>
    <script type="text/javascript" src="js/tripledes.js"></script>
    <script type="text/javascript" src="js/mode-ecb-min.js"></script>
    <script type="text/javascript" src="js/sign.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script type="text/javascript">
        var baseUrl = "https://static.vote.ukebms.com/";
        var baseUrl1 = "image/expression/";

        $(function () {
            var articleId = GetQueryString("articleId");
            var code = GetQueryString("code");
            var code1 = sessionStorage.getItem("code");
            var state = GetQueryString("state");
            if (isNull(articleId) !== true) {
                localStorage.setItem("articleId", articleId);
            }
            if (isNull(code) !== true) {
                sessionStorage.setItem("code", code);
                share();
                getopenid();
                firstLoginGetDate();
            } else {
                if (isNull(code1) !== true) {
                    share();
                    getopenid();
                    firstLoginGetDate();
                } else {
                    getCode();
                }
            }
        });

        function share() {
            var c = sessionStorage.getItem("code");
            var xhr = new XMLHttpRequest();
            xhr.open("GET", "http://static.vote.ukebms.com/wechat/share?code="+c+"&id=" + localStorage.getItem("articleId"), false);
            xhr.send(null);
            JSON.parse(xhr.responseText);
            console.log(JSON.parse(xhr.responseText))
            var data = JSON.parse(xhr.responseText);
            console.log(data.timestamp)
            console.log(data.noncestr)
            console.log(data.signature)
            var url = "";
            if (isNull(c) !== true) {
                url = "http://static.vote.ukebms.com?code="+c+"&articleId="+localStorage.getItem("articleId");
            }else {
                url = "http://static.vote.ukebms.com?articleId="+localStorage.getItem("articleId");
            }
            wx.config({
                debug: false,
                appId: 'wx92c338b093b87079',
                timestamp: data.timestamp,
                nonceStr: data.noncestr,
                signature: data.signature,
                jsApiList: ['onMenuShareAppMessage', 'onMenuShareTimeline', 'hideAllNonBaseMenuItem', 'showMenuItems']
                // 功能列表，我们要使用JS-SDK的什么功能
            });
            wx.ready(function () {
                // 获取“分享给朋友”按钮点击状态及自定义分享内容接口
                wx.onMenuShareAppMessage({
                    title: "钢镚", // 分享标题
                    desc: "钢镚分享", // 分享描述
                    link: url,//分享点击之后的链接
                    imgUrl:'http://static.vote.ukebms.com/image/logo.png', // 分享图标
                    type: 'link', // 分享类型,music、video或link，不填默认为link
                    success: function () {
                        //成功之后的回调
                    }
                });
                wx.hideAllNonBaseMenuItem();
                wx.showMenuItems({
                    menuList: ['menuItem:share:appMessage', 'menuItem:share:timeline'] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
                });
                wx.onMenuShareTimeline({
                    title: "钢镚", // 分享标题
                    desc: "钢镚分享", // 分享描述
                    link: url,//分享点击之后的链接
                    imgUrl:'http://static.vote.ukebms.com/image/logo.png', // 分享图标
                    type: 'link', // 分享类型,music、video或link，不填默认为link
                    success: function () {
                        //成功之后的回调
                    }
                });
            });
        }

        function goToAppStore() {
            location.href = "https://itunes.apple.com/cn/app/id1297898985";
        }

    </script>


</head>
<body>
<div style="width: 100%;height: 4rem;border-bottom: 1px #e6e6e6 solid;position: relative;">
    <img style="width: 3rem;height:3rem;margin-left: 0.8125rem;float: left;" src="image/logo.png"/>
    <div style="float: left;height: 3rem;margin-left: 1rem;">
        <div style="color: black;font-size: 1rem;line-height: 3rem;color: #59AAFF;">钢镚点评</div>
    </div>
    <div style="float: right;">
        <button type="button" style="background-color: #59AAFF;
        border: 0;color: #FFFFFF;
        letter-spacing: 0.05rem;font-size: 0.7rem;
        height: 1.5rem;width: 5rem;
        border-radius: 2rem;outline:none;margin-top: 0.7rem;margin-right: 0.8125rem;line-height: 1.5rem;"
                onclick="goToAppStore();">下载APP
        </button>
    </div>
    <div style="color: #BDC7C9;font-size: 0.6rem;margin-top:0.01rem;position: absolute;bottom: 4px;right:0;letter-spacing: 0.05rem;margin-left: 0.8125rem;">
        点击图片或表情进行投票
    </div>
</div>
<div style="width: 100%;">
    <div style="height: 3rem;width: 100%;">
        <img id="headImage" style="width: 2rem;height:2rem;margin-left: 0.8125rem;margin-top: 0.9375rem;float: left;"
             src="">
        <div style="float: left;height: 2rem;margin-left: 0.5rem;margin-top: 0.9375rem;">
            <div id="articleNickName" style="color: black;font-size: 0.75rem;margin-top: 0.09375rem;"></div>
            <div id="articleCreateTime" style="color: #98a0a9;font-size: 0.625rem;margin-top:0.01rem; "></div>
        </div>
    </div>
    <div id="articleContent"
         style="margin-left: 1.625rem;margin-right: 1.625rem;margin-top: 0.9375rem;font-size: 0.75rem;color: #4b4b51;text-align: center;"></div>
    <div style="margin-top: 1.09375rem;width: 100%;height: 2.5625rem;">
        <div style="width: 50%;float: left;">
            <div style="position:relative;width: 2.5625rem;height:2.5625rem;margin-left: -1.28125rem;left: 50%;">
                <img style="position:absolute;width: 2.5625rem;height:2.5625rem;" src="image/图文－表情框@3x.png"/>
                <img id="leftExpression" onclick="toup(1);"
                     style="position:absolute;width: 2rem;height:2rem;left: 0.28125rem;top: 0.28125rem;" src="">
            </div>
        </div>
        <div style="width: 50%;float: left;">
            <div style="position:relative;width: 2.5625rem;height:2.5625rem;margin-left: -1.28125rem;left: 50%;">
                <img style="position:absolute;width: 2.5625rem;height:2.5625rem;" src="image/图文－表情框@3x.png"/>
                <img id="rightExpression" onclick="toup(2);"
                     style="position:absolute;width: 2rem;height:2rem;left: 0.28125rem;top: 0.28125rem;" src="">
            </div>
        </div>
    </div>
    <div style="margin-top: 1.09375rem;width: 100%;height: 22.5rem;">
        <img id="divImage" style="width: 96.9%;height: 22.5rem;position: absolute;" src="">
        <div id="touMing"
             style="display:none;width: 100%;height: 22.5rem;position: absolute;background-color: #4b4b51;filter:alpha(Opacity=30);-moz-opacity:0.3;opacity: 0.3; "></div>
        <div style="width: 50%;height: 22.5rem;float: left;position: relative;">
            <div id="headLeft" onclick="toup(1);"
                 style="background-size:cover;width: 5.625rem;height: 5.625rem;left: 50%;margin-left: -2.8125rem;position: relative;margin-top: 5rem;">
                <img id="imageLeft" src="image/图文－投票－状态@3x.png"
                     style="visibility:hidden;width: 5.625rem;height: 5.625rem;"/>
            </div>
            <div id="leftPercent"
                 style="visibility:hidden;width: 5.625rem;height: 1.125rem;margin-top: 1.2rem;text-align: center;left: 50%;margin-left: -2.8125rem;position: relative;font-size: 1.125rem;color: white;">

            </div>
            <div style="width: 0.3125rem;left: 50%;margin-left: -0.15625rem;position: relative;height: 8.4375rem;margin-top: 1.09375rem;border-top-left-radius: 5px;border-top-right-radius: 5px;">
                <div id="leftH"
                     style="visibility:hidden;background-color: #4099ff;width: 0.3125rem;position: absolute;bottom: -0.05rem;">

                </div>
            </div>
        </div>
        <div style="width: 50%;height: 22.5rem;float: left;position: relative;">
            <div id="headRight" onclick="toup(2);"
                 style="background-size:cover;width: 5.625rem;height: 5.625rem;left: 50%;margin-left: -2.8125rem;position: relative;margin-top: 5rem;">
                <img id="imageRight" src="image/图文－投票－状态@3x.png"
                     style="width: 5.625rem;height: 5.625rem;visibility:hidden;"/>
            </div>
            <div id="rightPercent"
                 style="visibility:hidden;width: 5.625rem;height: 1.125rem;margin-top: 1.2rem;text-align: center;left: 50%;margin-left: -2.8125rem;position: relative;font-size: 1.125rem;color: white;">

            </div>
            <div style="width: 0.3125rem;left: 50%;margin-left: -0.15625rem;position: relative;height: 8.4375rem;margin-top: 1.09375rem;border-top-left-radius: 5px;border-top-right-radius: 5px;">
                <div id="rightH"
                     style="visibility:hidden;background-color: #ffffff;width: 0.3125rem;position: absolute;bottom: -0.05rem;">

                </div>
            </div>
        </div>
    </div>
    <div style="margin-top: 0.625rem;height: 0.9375rem;">
        <div style="float: left;margin-left: 0.8125rem;width: 0.9375rem;height: 0.9375rem;">
            <img style="width: 0.9375rem;height: 0.9375rem;" src="image/图文－参与icon@3x.png">
        </div>
        <div id="canYu"
             style="float: left;margin-left: 0.3125rem;height: 0.9375rem;font-size: 0.625rem;color: #4b4b51;line-height:1.2rem; ">
        </div>
        <div style="float: left;margin-left: 1.625rem;width: 0.9375rem;height: 0.9375rem;">
            <img style="width: 0.9375rem;height: 0.9375rem;" src="image/图文－评论icon@3x.png">
        </div>
        <div id="pingLun"
             style="float: left;margin-left: 0.3125rem;height: 0.9375rem;font-size: 0.625rem;color: #4b4b51;line-height:1.2rem;">
        </div>
    </div>
    <div style="width: 100%;height: 0.625rem;"></div>
    <div id="comment" style="width: 100%;height: 100%;">

    </div>
    <!--<div style="width: 100%;height: 100%;margin-top: 1rem;position: relative;" >
        <span style="position: absolute;font-size: 0.6875rem;color: #808080;margin-left: 0.8125rem;" >评论：</span>
        <div id="plContent" style="outline:none;resize:none;margin-left: 3.3125rem;
            margin-top: 0.625rem;
            margin-right: 1.55rem;
            font-size: 0.6875rem;
            color: #808080;
            letter-spacing: 0.05rem;
            padding-bottom: 0.625rem;border: 0;border-bottom: 1px #e6e6e6 solid;position: relative;" contenteditable="true" ></div>
    </div>
    <div style="width: 100%;height: 1rem;margin-top: 1rem;margin-bottom: 1rem;" >
        <button onclick="pltw();" type="button" style="cursor:pointer;color: #808080;float: right;border: 1px #e6e6e6 solid;background-color: #e6e6e6;outline:none;letter-spacing: 0.05rem;margin-right: 1.55rem;" >评论</button>
    </div>-->
</div>
<div onclick="showPl();"
     style="width: 2.25rem;height: 2.25rem;position: fixed;bottom: 1.5rem;right: 1.5rem;z-index: 100;">
    <img src="image/pl.png" style="width: 2.25rem;height: 2.25rem;"/></div>
</body>
<div id="plDiv"
     style="display:none;background-color:#FFFFFF;color:black;width:20rem;position: fixed;top:50%;left:50%;margin-left:-10rem;margin-top:-7.5rem;border: 1px #e6e6e6 solid;">
    <div onclick="closePl();"
         style="position: absolute;right: 0.5rem;cursor: pointer;font-size: 0.6875rem;margin-top: 0.15625rem;">X
    </div>
    <div id="cDiv" style="width: 100%;text-align: center;margin-top: 1rem;color: #808080;">评论</div>
    <input id="d" style="display: none" value="">
    <input id="ui" style="display: none" value="">
    <input id="t" style="display: none" value="">
    <input id="nn" style="display: none" value="">
    <input id="ci" style="display: none" value="">
    <div id="plContent" style="outline:none;resize:none;
            margin-top: 0.625rem;
            font-size: 0.6875rem;
            color: #808080;
            min-height: 5rem;
            letter-spacing: 0.05rem;margin-right: 0.5rem;margin-left: 0.5rem;
            padding: 0.625rem;border: 1px #e6e6e6 solid;" contenteditable="true"></div>
    <div style="width: 100%;height: 1rem;margin-top: 1rem;margin-bottom: 1rem;">
        <button onclick="pltw();" type="button"
                style="cursor:pointer;color: #808080;float: right;border: 1px #e6e6e6 solid;background-color: #e6e6e6;outline:none;letter-spacing: 0.05rem;margin-right: 1.55rem;">
            评论
        </button>
    </div>
</div>
<script type="text/javascript">
    function showPl(x) {

        var i = isLogin();

        if (i === true) {
            getCode();
            return;
        }

        if (isNull(x) !== true) {
            $("#d").val($(x).attr("d"));
            $("#ui").val($(x).attr("ui"));
            $("#t").val($(x).attr("t"));
            $("#nn").val($(x).attr("nn"));
            $("#ci").val($(x).attr("ci"));
            $("#cDiv").html("回复:" + $(x).attr("nn"));
        } else {
            $("#t").val(0);
            $("#cDiv").html("评论");
        }

        $("#plDiv").show();
    }

    function closePl() {
        $("#d").val("");
        $("#ui").val("");
        $("#t").val("");
        $("#nn").val("");
        $("#ci").val("");
        $("#plContent").html("");
        $("#plDiv").hide();
    }

</script>
</html>